home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazine 28 Bonus / CDRomMagazine-SoftKey-ArtPassion-FrenchVersion-Win31Mac.bin / data / arttour.dir / 00227_Script_Demo Pause scripts < prev    next >
Text File  |  1996-06-20  |  2KB  |  91 lines

  1. on startMovie
  2.   setAuxiliarySearch
  3.   
  4.   global gPaused, gContinued, PauseSprite
  5.   set PauseSprite = 44
  6.   set gPaused = FALSE
  7.   set gContinued = FALSE
  8. end
  9.  
  10. on exitTour
  11.   goBack
  12. end
  13.  
  14. -----------------------------
  15.  
  16. on checkPassClick
  17.   global gPaused, gContinued, PauseSprite
  18.   if gPaused then
  19.     if the clickon = PauseSprite then
  20.       continueDemo
  21.     end if
  22.   else if gContinued then
  23.     if the clickon = PauseSprite then
  24.       pauseDemo
  25.     end if
  26.   end if
  27. end
  28.  
  29.  
  30. -----------------------------
  31.  
  32.  
  33. on pauseDemo
  34.   global pauseSprite, gPaused
  35.   set the puppet of sprite pauseSprite = TRUE
  36.   set the castnum of sprite pauseSprite = the number of cast "ContinueButton"
  37.   updatestage
  38.   set gPaused = TRUE
  39.   set gContinued = FALSE
  40.   pause
  41. end
  42.  
  43. on continueDemo
  44.   global pauseSprite, gPaused
  45.   set the puppet of sprite pauseSprite = TRUE
  46.   set the castnum of sprite pauseSprite = the number of cast "PauseButton"
  47.   updatestage
  48.   set gPaused = FALSE
  49.   set gContinued = TRUE
  50.   continue
  51. end
  52.  
  53.  
  54. -- -----------------------------------------------------------
  55. -- Handler waitSoundDemo
  56. -- for use by demo, which can be paused, and doesn't processFrame
  57.  
  58. on waitSoundDemo soundChannel
  59.   repeat while (not (the mouseDown)) and soundBusy(soundChannel)    
  60.     updateStage
  61.     checkPassClick
  62.   end repeat
  63. end
  64.  
  65.  
  66. -- -----------------------------------------------------------
  67. -- Handler waitVideoDemo just waits for a video
  68. -- for use by demo, which can be paused, and doesn't processFrame
  69.  
  70. on waitVideoDemo whichSprite
  71.   set the movierate of sprite whichsprite = 1
  72.   repeat while  (not (the mouseDown)) and (the movieRate of sprite whichSprite <> 0) 
  73.     updatestage
  74.     checkPassClick
  75.   end repeat
  76. end
  77.  
  78. -- -----------------------------------------------------------
  79. -- Handler prepareVideoDemo
  80.  
  81. on prepareVideoDemo whichSprite
  82.   set the movierate of sprite whichsprite = 0
  83.   set the movieTime of sprite whichSprite to 0
  84. end
  85.  
  86.  
  87. -- Handler PreloadToDemo
  88.  
  89. on PreloadToDemo whichFrame, interruptFlag
  90.   preloadTo whichFrame, 0
  91. end